CCProtector 3
A mutator for UT
by TheCatcher
Original CCProtector by Dr.SiN
Forum: CatchersCTF Forums
Spawn Protection (with a vengence):
CCProtector3 protects players from other players weapon fire for a limited time when they first spawn.
It does NOT protect players from themselves and it does NOT protect any armour that the player may have picked up. Players can still take damage from their own weapons, Lava, Fire, Caustic Elements, and Falling.
CCProtector3 uses 2 levels of protection. The first level of protection only deactivates after a specified period of time has elapsed, or the player picks up the flag. The second level of protection deactivates when a specified period of time has elapsed, the player fires, changes weapons, or picks up the flag. The protections are sequential. The first level of protection defaults to 2 seconds. The second level defaults to 15 seconds. This results in a default of 17 seconds of spawn protection (2 + 15). The length of time that each level of protection lasts is configurable by the Server Admin (MinGuardTime, GuardTime).
Players can identify other players that are spawn protected by the moving lines around their body (teleporter animations).
Players can identify when they are spawn protected by the same moving lines and by a countdown timer on their HUD indicating how many seconds of protection they have remaining. The color of the countdown timer also indicates which level of protection they are currently enjoying. The HUD countdown timer colors, location, HUD ID, and existance are configurable by each user (ProtectedColor, GuardedColor, ShowTimer, HUDID, HUDX, HUDY). The HUD countdown timer can be disabled by the Server Admin (ShowTimer).
Vengence:
The Server Admin can configure CCProtector3 to punish players that abuse the Spawn Protection. By default it is not configured to punish abusers of the Spawn Protection.
If a level 1 spawn protected player fires on another player, the player firing can have health taken away (ProtectedShooterPenalty).
If a player fires on spawn protected player, the player firing can have health taken away (ProtectedVictimPenalty).
CCProtector3 INI File Settings:
Server UnrealTournament.ini File Settings: [CCProtector3.CCProtector]

Setting | Default | Description
MinGuardTime | 2 | Time in seconds that the player can not be hurt by other players unless the player picks up the flag.
GuardTime | 15 | Time in seconds that the player can not be hurt by other players unless the player shoots, changes weapons, or picks up the flag.
ShowTimer | TRUE | Display the amount of protection time remaining on the players hud.
MGTWeaponsDisableGT | FALSE | Weapon manipulation during MinGuardTime disables GuardTime.
FlagCarrierCanSpawnKill | TRUE | Flag carrier can defend themselves against protected players.
ProtectedShooterPenalty | 0 | Amount of Health to deduct from shooters that are currently protected.
ProtectedVictimPenalty | 0 | Amount of Health to deduct from shooters for shooting players that are currently protected.
bLog | FALSE | Log Spawn Protection usage to the log file.

Player CCProtector.ini File Settings: [CCProtector3.CCPHUD]

Setting | Default | Description
ShowTimer | TRUE | Show the HUD of the amount of protection time remaining (only applicable if the server has also enabled ShowTimer).
HUDID | Protected: | Spawn Protection Countdown timer HUD identifier.
HUDX | 0 | Horizontal Location of Countdown Timer on screen (in percentage of screen width (0-100)). 0 will place the Countdown Timer against the left edge of the screen; 50 will place it in the center; 100 will place it against the right edge; etc...
HUDY | 87 | Vertical Location of Countdown Timer on screen (in percentage of screen Height (0-100)). 0 will place the Countdown Timer against the top of the screen; 50 will place it in the center; 100 will place it against the bottom; etc...
ProtectedColor | (R=0,G=255,B=0,A=0) | Color of Countdown Timer when NO ONE can hurt you, unless you pick up the flag.
GuardedColor | (R=255,G=255,B=0,A=0) | Color of Countdown Timer when NO ONE can hurt you, unless you shoot, change weapons, or pick up the flag.

Change History:
Flag to allow the Flag Carrier to kill Spawn Protected players.
Flag to allow the player to change guns during the MinGuardTime.
Allow the player to pick up ammo for the gun he is carrying without deactivating.
No longer de-activates when armour or other protective gear is picked up.
Only protects against other player's weapon fire, not environmental or self inflicted damage.
HUD display to indicate the type of protection and number of seconds remaining.
Vengence options to minimize abuse of the spawn protection.
Installation:
CCProtector3 (Non-Umod)
Copy CCProtector3.int, CCProtector.ini, and CCProtector3.u into your UT System folder. And select "CCProtection V3,0" as a mutator when you start a game.
Additional Server Installation Steps:
To run it on server, add the following to your UT INI file.
[Engine.GameEngine]
ServerPackages=CCProtector3
If you are running an HTTP Redirect site, copy CCProtector3.u.uz to the redirect site.
If you are running a dedicated server (via UCC). Add the following to your "?mutator=" command line switch
CCProtector3.CCProtector
Source:
Dr.SiN has given permission for the CCProtector code to be used by anyone for any purpose.
I also give permission for anyone to use the CCProtector3 code for any purpose.
To facilitate that I have included 2 additional folders in the CCProtector3.zip file.
Classes - contains the UTScript for CCProtector3
Textures - contains the bitmaps used for the protection graphics.
To recompile CCProtector.u:
1. Copy the two additional folders (intact - including the folders) into a UT sub-folder called CCProtector3.
The resulting directory tree should look something like this:
C:\UnrealTournament
C:\UnrealTournament\CCProtector3
C:\UnrealTournament\CCProtector3\Classes
C:\UnrealTournament\CCProtector3\Textures
2. Add the following line to the [Editor.EditorEngine]
EditPackages=CCProtector3
3. Remove CCProtector3.u from your UT System Folder.
4. At a command prompt window, CD'ed into the UT System Folder Type
ucc make
There should now be a new CCProtector3.u file in your UT System Folder.
If you wish to make changes to CCProtector3, you should rename it.
To rename CCProtector3 to CCProtector4:
There are 3 steps to renaming a UT Mutator in the source code.
1. Rename the top level CCProtector3 folder to CCProtector4.
2. Rename the CCProtector3.int file to CCProtector4.int.
3. Change all occurances of CCProtector3 to CCProtector4 in the following locations.
A. The CCProtector4\Classes folder UC files.
B. The UnrealTournament.ini file.
C. The CCProtector3.int file.
D. The CCProtector.ini file.